import request from "@/utils/request";

export function ifHaveAuth(data){
    return request({
        url: '/am/amAuth/ifHaveAuth',
        method: 'post',
        data: data
    })
}

// 查询文件夹详细
export function viewFolder(id) {
    return request({
        url: '/am/amBrowse/viewFolder/' + id,
        method: 'get'
    })
}

// 查询文件夹详细
export function preview(id) {
    return request({
        url: '/am/amBrowse/preview/' + id,
        method: 'get'
    })
}

// 查询文件夹详细
export function viewFile(id) {
    return request({
        url: '/am/amBrowse/viewFile/' + id,
        method: 'get'
    })
}

// 新建文件夹
export function addFolder(data){
    return request({
        url: '/am/amBrowse/addFolder',
        method: 'post',
        data: data
    })
}

// 重命名文件夹
export function renameFolder(data) {
    return request({
        url: '/am/amBrowse/renameFolder',
        method: 'post',
        data: data
    })
}


// 重命名档案文件
export function renameFile(data) {
    return request({
        url: '/am/amBrowse/renameFile',
        method: 'post',
        data: data
    })
}

// 移动文件夹
export function moveFolder(data) {
    return request({
        url: '/am/amBrowse/moveFolder',
        method: 'post',
        data: data
    })
}

// 移动文件档案
export function moveFile(data) {
    return request({
        url: '/am/amBrowse/moveFile',
        method: 'post',
        data: data
    })
}


// 删除文件夹
export function deleteFolder(id) {
    return request({
        url: '/am/amBrowse/deleteFolder/'+id,
        method: 'post'
    })
}


// 删除文件档案
export function deleteFile(id) {
    return request({
        url: '/am/amBrowse/deleteFile/'+id,
        method: 'post'
    })
}
